// 个体疫病记录ssss
import ax from "@/api/axios";
export default {
  // 查询所有设施组
  queryFacilitygroupAll() {
    return ax.sheepOutA.post(`/bion/facility/queryFacilityGroupAll`, {});
  },
  queryFacilitybycondition(id) {
    return ax.sheepOutA.get(`/bion/facility/queryByFacilityGroupId`, {
      params: {
        facilityGroupId: id
      }
    });
  },
  // 设施id查询羊舍有哪些羊
  getBionbyfac(id) {
    return ax.sheepOutA.get(`bion/v1/bion/v1/queryBionByFacilityId/${id}`);
  },
  // v1/blightRecord/queryPageList
  queryPageList(params) {
    // console.log(params)
    return ax.sheepOut.post("/health/v1/blightRecord/queryPageList", params);
  },
  // 根据耳标查id
  geteagTag(params) {
    return ax.sheepOut.get(`/bion/v1/bion/queryBionByEagTag/HuSheep/${params}`);
  },
  // 条件查询疫病记录接口/health/v1/blightRecord/queryByCondition
  queryBlightRecordByCondition(params) {
    return ax.sheepOut.post("/health/v1/blightRecord/queryByCondition", params);
  },
  // /v1/blight/queryName
  queryAll() {
    return ax.sheepOut.get("/health/v1/blightRecord/queryAll");
  },
  /**
   * @description: 查询病疫信息
   * @return {Object}
   */
  queryAllBlight(params) {
    return ax.sheepOut.get("/health/v1/blight/queryAll", params);
  },
  /**
   * @description: 查询所有个体信息
   * @return {Object}
   */
  queryBionAll(params) {
    return ax.sheepOutA.get(`/bion/v1/bion/queryBionAll/${params.breed}`);
  },
  /**
   * @description: 查询个体信息
   * @return {Object}
   */
  queryBionById(params) {
    return ax.sheepOutA.get(`/bion/v1/bion/queryBionById/${params.bionId}`);
  },

  /**
   * @description: 条件查询接口疫苗
   * @return {Object}
   */
  queryByCondition(params) {
    return ax.sheepOut.post("/health/v1/vaccination/queryByCondition", params);
  },
  /**
   * @description: 添加
   * @param {String} bionId
   * @param {String}  blightId
   * @param {String}  executionEndTime
   * @param {String}  executionStartTime
   * @return {Object}
   */
  add(params) {
    return ax.sheepOut.post("/health/v1/blightRecord/add", params);
  },
  /**
   * @description: 修改
   * @param {String} bionId
   * @param {String} blightRecordId
   * @param {String}  blightId
   * @param {String}  executionEndTime
   * @param {String}  executionStartTime
   * @return {Object}
   */
  edit(params) {
    return ax.sheepOut.post("/health/v1/blightRecord/edit", params);
  },
  /**
   * @description: 删除
   * @param {Array} blightRecordIdList
   * @return {Object}
   */
  del(params) {
    return ax.sheepOut.post("/health/v1/blightRecord/delList", params);
  },

  // 员工条件查询
  /**
   * @description: 员工条件查询
   * @return {Object}
   */
  queryByConditionEmployee(params) {
    return ax.sheepOutB.post(
      "organizationManage/employee/queryByCondition",
      params
    );
  },
  /** ********************疫苗******************/
  /**
   * @description: 添加
   * @param {String} bionId
   * @param {String}  organizationNo
   * @param {String}  vaccinationDate
   * @param {String}  vaccinumId
   * @return {Object}
   */
  addVaccination(params) {
    return ax.sheepOut.post("/health/v1/vaccination/addAll", params);
  },
  /**
   * @description: 添加
   * @param {String} bionId
   * @param {String}  organizationNo
   * @param {String}  vaccinationId
   * @param {String}  vaccinationDate
   * @param {String}  vaccinumId
   * @return {Object}
   */
  editVaccination(params) {
    return ax.sheepOut.post("/health/v1/vaccination/edit", params);
  },
  /**
   * @description: 删除
   * @param {Array} vaccinationIdList
   * @return {Object}
   */
  delVaccination(params) {
    return ax.sheepOut.post("/health/v1/vaccination/delList", params);
  },
  /**
   * @description: 分页
   * @param {Array} vaccinationIdList
   * @return {Object}
   */
  queryPageVaccinationList(params) {
    // console.log(params)
    return ax.sheepOut.post("/health/v1/vaccination/queryPageList", params);
  },

  /**
   * @description: 查询疫苗信息
   * @return {Object}
   */
  queryVaccinumAll(params) {
    return ax.sheepOut.get("/health/v1/vaccinum/queryAll", params);
  },
  // 根据id查询体重 bion/bionGrowthRecord/queryBionGrowthRecord/{bionId}
  queryBionGrowthRecord(params) {
    return ax.sheepOut.get(
      `bion/bionGrowthRecord/queryBionGrowthRecord/${params}`
    );
  }
};
